<extend name="Public:publicHTML"/>

<block name="content">
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/system/bootstrap.min.css"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/system/system.css"/>
	<div class="aw-content-wrap">
		
		<if condition="!empty($data)">
			<foreach name="data" key='key' item="value">
				<form class="form">
					<div class="mod">
					   <div class="mod-head">
				            <h3>
				                <span class="pull-left">{$value.config_class_name}</span>
				                <span class="pull-right"><a href="javascript:;" onclick="sys.submit(this, '{:U('saveConfig')}');" class="btn btn-xs btn-primary mod-site-save">快速保存</a></span>
				            </h3>
				        </div>
				        <div class="tab-content mod-content">
				        	 <input type="hidden" value="{$value.id}" name="class_id"/>
				        	 <if condition="!empty($value['children'])">
				            	<table class="table table-striped">
				            		<foreach name="value.children" key='key' item='child'>
						                <switch name="child.type">
						                	<case value="radio">
							                <tr>
							                    <td>
							                        <div class="form-group">
							                            <span class="col-sm-4 col-xs-3 control-label">{$child.config_class_name}:</span>
							                            <div class="col-sm-6 col-xs-8">
							                                <div class="btn-group mod-btn">
							                                    <label type="button" class=" mod-btn-color">
							                                        <{$child.show_type} type="{$child.type}" name="{$child.type_name}" value="0"<?php if ($child['value'] == 0) { ?> checked="checked"<?php } ?> /> 是
							                                    </label>
																
							                                    <label type="button" class=" mod-btn-color">
							                                        <{$child.show_type} type="{$child.type}" name="{$child.type_name}" value="1"<?php if ($child['value'] == 1) { ?> checked="checked"<?php } ?> /> 否
							                                    </label>
							                                </div>
							                            </div>
							                        </div>
							                    </td>
							                </tr>
							              </case>
							              <case value="text|password">
							              	 <tr>
							                    <td>
							                        <div class="form-group">
							                            <span class="col-sm-4 col-xs-3 control-label">{$child.config_class_name}:</span>
							                            <div class="col-sm-5 col-xs-8">
							                                <{$child.show_type} name="{$child.type_name}" type="{$child.type}" class="form-control" value="{$child['value']}"/>
							                            </div>
							                        </div>
							                    </td>
							                </tr>
							              </case>
							            </switch>
					                </foreach>
				            	</table>
				            </if>
				        </div>
					</div>
				</form>
			</foreach>
		</if>
	</div>
	<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.form.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/js/sys/sys.js"></script>
</block>


